package strategic_monitor

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/common/utils"
)

type StrategicMonitorRepositoryIface interface {
	// QueryStrategicBidList 源数据-招标
	QueryStrategicBidList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicBid, error)
	UpdateStrategicBid(ctx context.Context, condition, data map[string]interface{}) error

	// QueryStrategicWinbidList 源数据-中招
	QueryStrategicWinbidList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicWinbid, error)
	UpdateStrategicWinbid(ctx context.Context, condition, data map[string]interface{}) error

	// QueryStrategicBidAuditList 经过运营审核后的招中标数据
	QueryStrategicBidAuditList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicBidAudit, error)
	SaveStrategicBidAudit(ctx context.Context, data *StrategicBidAudit) (*StrategicBidAudit, error)
	UpdateStrategicBidAudit(ctx context.Context, condition, data map[string]interface{}) error
	CountStrategicBidAuditByIndustryId(ctx context.Context, industryId int64) (int64, error)

	// QueryStrategicBidCompanyList 经过运营审核后的招中标的甲方单位
	QueryStrategicBidCompanyList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicBidCompany, error)
	SaveStrategicBidCompany(ctx context.Context, data *StrategicBidCompany) (*StrategicBidCompany, error)
	UpdateStrategicBidCompany(ctx context.Context, condition, data map[string]interface{}) error
	CountBidCompanyByIndustryId(ctx context.Context, industryId int64) (int64, error)
	QueryBidCompanyOrganizingCodeByIndustryName(ctx context.Context, industryName []string) ([]string, error)

	// QueryStrategicBidIndustryList 经过运营审核后的招中标的品类
	QueryStrategicBidIndustryList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicBidIndustry, error)
	SaveStrategicBidIndustry(ctx context.Context, data *StrategicBidIndustry) (*StrategicBidIndustry, error)
	UpdateStrategicBidIndustry(ctx context.Context, condition, data map[string]interface{}) error

	// QueryStrategicBidCooperateCompanyList 经过运营审核后的招中标的合作单位数据
	QueryStrategicBidCooperateCompanyList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicBidCooperateCompany, error)
	SaveStrategicBidCooperateCompany(ctx context.Context, data *StrategicBidCooperateCompany) (*StrategicBidCooperateCompany, error)
	UpdateStrategicBidCooperateCompany(ctx context.Context, condition, data map[string]interface{}) error
	CountBidCompanyCooperate(ctx context.Context, bidCompanyName, organizingCode string) (int64, error)
	CountBidCompanyCooperateByIndustryId(ctx context.Context, industryId int64) (int64, error)
	GetBidCompanyCooperateByCompanyId(ctx context.Context, companyId int64, pageInfo *utils.PageInfo) (int64, []*StrategicBidCooperateCompany, error)
	GetCooperateNameByBidCompanyAndIndustry(ctx context.Context, organizingCode string, industryNames []string, pageInfo *utils.PageInfo) ([]*BidCompanyCooperateBo, error)

	// QueryStrategicIndustryList 品类的基础数据
	QueryStrategicIndustryList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*StrategicIndustry, error)
	SaveStrategicIndustry(ctx context.Context, data *StrategicIndustry) (*StrategicIndustry, error)
	UpdateStrategicIndustry(ctx context.Context, condition, data map[string]interface{}) error
	QueryStrategicIndustryByAuditId(ctx context.Context, auditId int64) ([]*StrategicIndustry, error)
}
